<style>
.ui-step {
    padding:0.3rem 0;
    zoom: 1;
    margin: 0 0.3rem;
}
.ui-step:after {
    content: "";
    display: table;
    clear: both
}
.ui-step li {
    float: left;
    position: relative;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
	list-style:none;
    text-align: center
}
.ui-step li::before, .ui-step li::after {
    position: absolute;
    left: 0;
    top: 46px;
    display: block;
    content: ' ';
    width: 50%;
    height: 4px;
    background: #f2f3f7;
    z-index: 1
}
.ui-step li::after {
    left: 50%
}
.ui-step li:first-child::before {
    width: 0
}
.ui-step li:last-child::after {
    width: 0
}
.ui-step .ui-step-title {
    color: #333;
    font-size: 0.5rem;
    line-height: 18px
}
.ui-step .ui-step-number {
    position: relative;
    display: inline-block;
    width: 37px;
    height: 37px;
    margin: 10px 0;
    line-height: 37px;
    background: #f2f3f7;
    color: #cac9c9;
    border-radius: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    z-index: 2;
}
.ui-step li.ui-step-done .ui-step-number {
    color: #fff;
}
.ui-step .ui-step-meta {
    color: #ccc;
	font-size:0.5rem
}
.ui-step li.ui-step-done::before,
.ui-step li.ui-step-done::after,
.ui-step li.ui-step-done .ui-step-number {
    background: #54c952
}
.ui-step-2 li {
    width: 50%
}
.ui-step-3 li {
    width: 33.33333%
}
.ui-step-4 li {
    width: 24.9999%
}
.ui-step-5 li {
    width: 20%
}
.ui-step-8 li {
    width: 12.499%;
}
</style>
<div ng-show="(pagedata.params.status >= 4 || pagedata.userdeleted == 1) && (pagedata.params.status!=100 || (pagedata.userdeleted == 1 && pagedata.params.status==100))" class="fui-tab fui-tab-danger jy2-headertop" style="top:2.5rem;margin-top:0">
			<a href="javascript:" ng-click="pagedata.userdeleted = 0;pagedata.params.status = 100;tool.get_list('jy_newcar/order.list/getlist/',true)" class="external">其他订单</a>
			<a ng-class="{'external active':pagedata.params.status == 5}" ng-click="pagedata.params.status = 5;tool.get_list('jy_newcar/order.list/getlist/',true)">申请售后</a>
			<a ng-class="{'external active':pagedata.params.status == 6}" ng-click="pagedata.params.status = 6;tool.get_list('jy_newcar/order.list/getlist/',true)">处理售后</a>
			<a ng-class="{'external active':pagedata.params.status == 4}" ng-click="pagedata.params.status=4;tool.get_list('jy_newcar/order.list/getlist/',true)">已关闭</a>
			<a ng-class="{'external active':pagedata.userdeleted == 1 && pagedata.params.status==100}" ng-click="pagedata.params.status=100;pagedata.userdeleted=1;tool.get_list('jy_newcar/order.list/getlist/userdeleted=1',true)">已删除</a>
	</div>
	<div ng-show="(pagedata.params.status < 4 || pagedata.params.status==100) && pagedata.userdeleted!=1" class="fui-tab fui-tab-danger jy2-headertop" style="top:2.5rem;margin-top:0">
			 <a ng-class="{'external active':pagedata.params.status == 100 && pagedata.userdeleted!=1}" ng-click="pagedata.params.status = 100;tool.get_list('jy_newcar/order.list/getlist/',true)">全部</a>
			<a ng-class="{'external active':pagedata.params.status == 0}" ng-click="pagedata.params.status = 0;tool.get_list('jy_newcar/order.list/getlist/',true)">待付定金</a>
			<a ng-class="{'external active':pagedata.params.status == 1}" ng-click="pagedata.params.status = 1;tool.get_list('jy_newcar/order.list/getlist/',true)">已付定金</a>
			<a ng-class="{'external active':pagedata.params.status == 2}" ng-click="pagedata.params.status = 2;tool.get_list('jy_newcar/order.list/getlist/',true)">进度中</a>
			<a ng-class="{'external active':pagedata.params.status == 3}" ng-click="pagedata.params.status = 3;tool.get_list('jy_newcar/order.list/getlist/',true)">已完成</a>
	 
	</div>
<div class='fui-content order-list' style="margin-top:0.7rem">
		<div class="fui-list-group order-item" ng-repeat="item in pagedata.list" style="border-bottom: 0.3rem solid #f2f2f2;">
                <a class="fui-list external" style="padding: 0.42rem 0.5rem" data-nocache="true" ng-click="access_json('/order.detail//id='+item.id)">
                    <div class="fui-list-inner">
                        <div class="subtitle"> 订单号: {{item.ordersn}}</div>
                    </div>
                    <div class="row-remark text-cancel" style="width: auto; font-size: 0.65rem;text-align: right;">{{item.statustitle}}</div>
                    <div class="angle"></div>
                </a> 
					<div ng-repeat="m in item.merchs">
						<a ng-if="m.id" href="javascript:;" data-nocache="true" ng-click="access_json('jy_merch/merch//id='+m.id)">
							<div class="fui-list-group-title lineblock bold">
								<i class="icon jinyunicon icon-dianpu"></i> {{m.merchname || '多商户'}}
								<span class="status noremark" style="font-size:0.50rem" ><i class="icon jinyunicon icon-icon-test"></i></span>
							</div>
						</a>
						<a ng-if="!m.id">
							<div class="fui-list-group-title lineblock bold">
								<i class="icon jinyunicon icon-dianpu"></i> {{pagedata.shopset.store_title || '平台自营'}}
								<span class="status noremark" style="font-size:0.50rem" ><i class="icon jinyunicon icon-icon-test"></i></span>
							</div>
						</a>
						<a href="javascript:;" ng-repeat="g in m.goods" class="external" data-nocache="true" ng-click="access_json('/order.detail//id='+item.id)">
							<div class="fui-list goods-list">
								<div class="fui-list-media" style="">
									<img class="" ng-src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}">
								</div>
								<div class="fui-list-inner">
									<div class="text goodstitle towline">{{g.title}}</div>
									<div class="text" style="font-size:0.65rem">
									<!--<span class="">{{g.api_data.year||0}}年</span> | 
									<span class="">{{g.api_data.gongli||0}}万公里</span>-->
									</div>
									<div class="text"><i class="fui-tag fui-tag-red">{{item.buytypetitle||'购车付定金'}}</i> <i class="fui-tag fui-tag-red">{{item.send_statustitle}}</i></div>
								</div>
								<div class="fui-list-angle" style="width:auto">
									<div><span class="marketprice syscolorred">￥{{g.price}}</span></div>
									<div ng-show="g.can_refund==1 && item.status!=3" class="btn btn-sm btn-default-o order-finish" style="line-height:1.8;" href="javascript:;" ng-click="access_json('jy_weishop/order.refund/apply/orderid='+item.id+'&ordergoodsid='+g.ordergoodsid)">申请退款</div>
									<div ng-show="g.can_refund==2 && item.status!=3" class="btn btn-sm btn-default-o order-finish" style="line-height:1.8;" href="javascript:;" ng-click="access_json('jy_weishop/order.refund/apply/orderid='+item.id+'&ordergoodsid='+g.ordergoodsid)">申请售后</div>
									<div ng-show="g.refund_id>0" class="btn btn-sm btn-default-o order-finish" style="line-height:1.8;" href="javascript:;" ng-click="access_json('jy_weishop/order.refund/list/orderid='+item.id)">查看退款</div>
									<div ng-if="(g.status==1 || g.status==2 || g.status==3) && item.tuilogid>0" class="btn btn-sm btn-default-o order-finish" style="line-height:1.8;" href="javascript:;" ng-click="access_json('jy_newcar/gou.orderfee//orderid='+item.id)">查看推广组</div>
								</div>
							</div>
						</a>
					</div>
                
				<div ng-if="item.status>=1 && item.api_data.buytype!=1" class="title" style="padding:0">
				<div class="fui-text" style="width:auto;padding:0.3rem 0.5rem">购车进度</div>
				<div class="fui-cellone" style="padding-top:0;padding-bottom:0.2rem;">
					<div class="fui-cellone-label" style="width:2.5rem;padding-right:0.5rem">
						<span ng-if="item.sendlogs[0]" class="label label-success" style="background:{{main.syscolor||'#05c175'}};color:#fff;padding:0.2rem 0.3rem">按揭</span>
						<span ng-if="!item.sendlogs[0]" class="label label-success" style="background:#f2f2f2;color:#333;padding:0.2rem 0.3rem">按揭</span>
					</div>
					<div ng-if="item.sendlogs[0]" class="fui-cellone-text">
						<div class="fui-cellone" style="padding:0.15rem;">
							<div class="fui-cellone-text" style="font-size:0.65rem;padding:0 0.3rem">
							<span>服务人员 {{item.sendlogs[0].workertitle}}</span>
							<a href="tel:{{item.sendlogs[0].workermobile}}" class="syscolor" style="padding-left:0.6rem">{{item.sendlogs[0].workermobile}}</a>
							</div>
							<div class="fui-cellone-remark noremark" ng-click="pagedata.now_logimg=item.sendlogs[0].image;pagedata.show_logimg=true" style="font-size:0.65rem">
								<span class="syscolor">查看凭证</span>
							</div>
						</div>
					</div>
				</div>
				<div class="fui-cellone" style="padding-top:0;padding-bottom:0.2rem">
					<div class="fui-cellone-label" style="width:2.5rem;padding-right:0.5rem">
						<span ng-if="item.sendlogs[1]" class="label label-success" style="background:{{main.syscolor||'#05c175'}};color:#fff;padding:0.2rem 0.3rem">买保险</span>
						<span ng-if="!item.sendlogs[1]" class="label label-success" style="background:#f2f2f2;color:#333;padding:0.2rem 0.3rem">买保险</span>
					</div>
					<div ng-if="item.sendlogs[1]" class="fui-cellone-text">
						<div class="fui-cellone" style="padding:0.15rem;">
							<div class="fui-cellone-text" style="font-size:0.65rem;padding:0 0.3rem">
							<span>服务人员 {{item.sendlogs[1].workertitle}}</span>
							<a href="tel:{{item.sendlogs[1].workermobile}}" class="syscolor" style="padding-left:0.6rem">{{item.sendlogs[1].workermobile}}</a>
							</div>
							<div class="fui-cellone-remark noremark" ng-click="pagedata.now_logimg=item.sendlogs[1].image;pagedata.show_logimg=true" style="font-size:0.65rem">
								<span class="syscolor">查看凭证</span>
							</div>
						</div>
					</div>
				</div>
				<div class="fui-cellone" style="padding-top:0">
					<div class="fui-cellone-label" style="width:2.5rem;padding-right:0.5rem">
						<span ng-if="item.sendlogs[2]" class="label label-success" style="background:{{main.syscolor||'#05c175'}};color:#fff;padding:0.2rem 0.3rem">提车</span>
						<span ng-if="!item.sendlogs[2]" class="label label-success" style="background:#f2f2f2;color:#333;padding:0.2rem 0.3rem">提车</span>
					</div>
					<div class="fui-cellone-text">
						<div ng-if="item.sendlogs[2]" class="fui-cellone" style="padding:0.15rem;">
							<div class="fui-cellone-text" style="font-size:0.65rem;padding:0 0.3rem">
							<span>服务人员 {{item.sendlogs[2].workertitle}}</span>
							<a href="tel:{{item.sendlogs[2].workermobile}}" class="syscolor" style="padding-left:0.6rem">{{item.sendlogs[2].workermobile}}</a>
							</div>
							<div class="fui-cellone-remark noremark" ng-click="pagedata.now_logimg=item.sendlogs[2].image;pagedata.show_logimg=true" style="font-size:0.65rem">
								<span class="syscolor">查看凭证</span>
							</div>
						</div>
					</div>
				</div>
				</div>
			<div class="fui-list-group-title lineblock">
					<span style="color:#999;font-size:0.65rem"><i class="icon jinyunicon icon-shijian" style="color:#f60;font-size:0.60rem"></i> {{item.createtime}}</span>
                    <span class="status noremark"> <span style="color:#999;font-size:0.65rem" ng-if="item.yuejiemid>0">月结支付</span><span style="color:#999;font-size:0.65rem" ng-if="item.yuejiemid==0">{{item.paytypetitle||'现金实付'}}</span> <span class="text-danger">{{item.creditfee>0?item.creditfee+'个':'￥'+item.price}}</span></span>
            </div>
            <div class="fui-list-group-title lineblock opblock">
				<span class="status noremark">
					<div ng-show="item.can_cancel" class="btn btn-sm btn-default-o order-delete" href="javascript:;" ng-click="pagedata.checkcancel=true;pagedata.orderid=item.id">取消订单</div>
					<div ng-show="item.status == 0 && item.paytype!='peerpay'" class="btn btn-sm btn-danger-o order-finish" ng-click="pay_submit({},'//pay/id='+item.id,'/order.list/','/order.list/')">支付订单</div>
					<div ng-show="item.status == 0 && item.paytype=='peerpay'" class="btn btn-sm btn-danger-o order-finish" ng-click="access_json('jy_weishop/order.peerpay/share/orderid='+item.id)">找人代付</div>
					<div ng-show="!item.can_cancel && item.can_refund && item.status!=3" class="btn btn-sm btn-danger-o order-finish" href="javascript:;" ng-click="access_json('jy_weishop/order.refund/apply/orderid='+item.id)">申请退款</div>
					<div ng-show="item.status==5" class="btn btn-sm btn-default-o order-finish" href="javascript:;" ng-click="access_json('jy_weishop/order.refund/list/orderid='+item.id)">查看退款进度</div>
				</span>
            </div>
        </div>
		<div class="content-empty" ng-show="!pagedata.list || pagedata.list.length == 0 ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有订单！</p>
		</div>
	</div>
<div ng-if="pagedata.show_logimg" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" ng-click="pagedata.show_logimg=false"></i>
			<div class="content-images" style="padding:0.5rem;height:20rem; overflow-y:scroll;">
					<div class="title bold" style="font-size:0.8rem">[预览]凭证</div>
					<div class="text" style="padding-top:0.5rem;font-size:0.7rem">
						<img style="width:100%" ng-src="{{tomedia(pagedata.now_logimg)}}">
					</div>
			</div>
		</div>
	</div>
</div>
<script>
if(scope.pagedata.redfee>0){
	$("#openvoice")[0].play();
}
scope.pagedata.payaddprice=function(id){
	scope.post_json('jy_newcar/order.list/payaddfee/id='+id,{},function(result){
		scope.pagedata.order_id=result.order_id;
		scope.$evalAsync();
		scope.tool.pay(result.pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','/order.list/');
				}else{
					scope.message('支付失败！','success','/order.list/');
				}
			});
	});
}
if(scope.pagedata.gopayaddpriceid>0){
	scope.pagedata.payaddprice(scope.pagedata.gopayaddpriceid);
}
scope.tool.get_list('jy_newcar/order.list/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_newcar/order.list/getlist/');
}
</script>